/**
 * @y.liu 速度定义
 * 
 */

#ifndef __SPEED_DEF_H__
#define __SPEED_DEF_H__

#include <string>

namespace global_path_planner {
namespace common{

class Speed_Def
{
public:

    enum SpeedLevel
    {
        LOW_SPEED = 0,
        MIDDLE_SPEED,
        HIGH_SPEED
    };

    /**
     * @brief 获取速度
     *
     */
    static float ObtainSpeed(const std::string &robot_type, int16_t& speed_level)
    {
        if ((robot_type == "SW55A_AA") ||
            (robot_type == "SW55A_AB") ||
            (robot_type == "SW55S_AA") ||
            (robot_type == "SW55C_AA") ||
            (robot_type == "SW55L_AA") ||
            (robot_type == "KT60S_AA"))
        {
            if(speed_level == LOW_SPEED){
                return 0.3;
            }else if(speed_level == MIDDLE_SPEED){
                return 0.5;
            }else if(speed_level == HIGH_SPEED){
                return 0.7;
            }
        }
        else if ((robot_type == "SW80A_AA") ||
                 (robot_type == "SW80P_AA") ||
                 (robot_type == "SW80P_AB") ||
                 (robot_type == "SW80P_AC") ||
                 (robot_type == "SW80P_AD") ||
                 (robot_type == "SW80P_AE") ||
                 (robot_type == "SW85A_AA") ||
                 (robot_type == "SW85P_AA"))
        {
            if(speed_level == LOW_SPEED){
                return 0.3;
            }else if(speed_level == MIDDLE_SPEED){
                return 0.5;
            }else if(speed_level == HIGH_SPEED){
                return 0.7;
            }
        }
        return 0.3;
    }
};
} // common
} // global_path_planner

#endif // __SPEED_DEF_H__